-- ----------------------------- 2024-04-18 add by jiangjl@sunwaoworld.com--------------begin

-- 建表语句
CREATE TABLE T_LIMS_PRODUCT_TEST_INFO( 
    ID NUMBER NOT NULL,
    PRODUCTID NUMBER NULL,
    PRODUCTCODE VARCHAR2(33)  NULL,
    MAINOPERATOR VARCHAR2(66)  NULL,
    MAINREVIEWER VARCHAR2(66)  NULL,
    TEST VARCHAR2(99)  NULL
 );
COMMENT ON TABLE T_LIMS_PRODUCT_TEST_INFO IS '项目检测信息表';
COMMENT ON COLUMN T_LIMS_PRODUCT_TEST_INFO.ID IS '主键';
COMMENT ON COLUMN T_LIMS_PRODUCT_TEST_INFO.PRODUCTID IS '产品id';
COMMENT ON COLUMN T_LIMS_PRODUCT_TEST_INFO.PRODUCTCODE IS '产品编码';
COMMENT ON COLUMN T_LIMS_PRODUCT_TEST_INFO.MAINOPERATOR IS '检测人';
COMMENT ON COLUMN T_LIMS_PRODUCT_TEST_INFO.MAINREVIEWER IS '复核人';
COMMENT ON COLUMN T_LIMS_PRODUCT_TEST_INFO.TEST IS '检测方法';

ALTER TABLE T_LIMS_PRODUCT_TEST_INFO ADD CONSTRAINT PK_LIMS_PRODUCT_TEST_INFO PRIMARY KEY (ID);

-- 旧版审计跟踪，跟踪配置变更语句

INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','ID','1','jiangjl@sunwaoworld.com','jiangjl@sunwaoworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','PRODUCTID','1','jiangjl@sunwaoworld.com','jiangjl@sunwaoworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','PRODUCTCODE','1','jiangjl@sunwaoworld.com','jiangjl@sunwaoworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','MAINOPERATOR','1','jiangjl@sunwaoworld.com','jiangjl@sunwaoworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','MAINREVIEWER','1','jiangjl@sunwaoworld.com','jiangjl@sunwaoworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','TEST','1','jiangjl@sunwaoworld.com','jiangjl@sunwaoworld.com', CURRENT_TIMESTAMP);
COMMIT;

INSERT INTO T_CORE_AT_CONFIG (ID, AUDITTRAIL, CREATEDBYID, CREATEDBYNAME, CREATEDTIME)
VALUES ('T_LIMS_PRODUCT_TEST_INFO', '1', 'jiangjl@sunwaoworld.com', 'jiangjl@sunwaoworld.com', CURRENT_TIMESTAMP);

-- 审计跟踪V2，跟踪配置变更语句

INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','ID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','PRODUCTID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','PRODUCTCODE','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','MAINOPERATOR','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','MAINREVIEWER','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PRODUCT_TEST_INFO','TEST','1');
COMMIT;

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_PRODUCT_TEST_INFO', '项目检测信息表', 'service', '1');
CALL INSERTI18N('T_LIMS_PRODUCT_TEST_INFO.SERVICE_NAME', '项目检测信息表', '项目检测信息表', 'zh-CN', '项目检测信息表');
CALL INSERTI18N('T_LIMS_PRODUCT_TEST_INFO.ID', '项目检测信息表的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_PRODUCT_TEST_INFO.PRODUCTID', '项目检测信息表的产品id', '产品id', 'zh-CN', '产品id');
CALL INSERTI18N('T_LIMS_PRODUCT_TEST_INFO.PRODUCTCODE', '项目检测信息表的产品编码', '产品编码', 'zh-CN', '产品编码');
CALL INSERTI18N('T_LIMS_PRODUCT_TEST_INFO.MAINOPERATOR', '项目检测信息表的检测人', '检测人', 'zh-CN', '检测人');
CALL INSERTI18N('T_LIMS_PRODUCT_TEST_INFO.MAINREVIEWER', '项目检测信息表的复核人', '复核人', 'zh-CN', '复核人');
CALL INSERTI18N('T_LIMS_PRODUCT_TEST_INFO.TEST', '项目检测信息表的检测方法', '检测方法', 'zh-CN', '检测方法');
CALL INSERTI18N('BASEMODULE.COREDATA.PRODUCTTESTINFOS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.COREDATA.PRODUCTTESTINFOS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.COREDATA.PRODUCTTESTINFOS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.COREDATA.PRODUCTTESTINFOS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.COREDATA.PRODUCTTESTINFOS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');

-- 创建菜单语句
INSERT INTO T_CORE_MENU (ID, MENUNAME, HREF, PARENTID, ORDERNO, ICON, MENUINITNAME)
VALUES ('哈啊', '-1', '/secure/basemodule/coredata/product-test-infos/page/edit-list', 'null', '哈啊', 'null', '-1');

INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_PRODUCT_TEST_INFO', '0', '0');


COMMIT;

-- ----------------------------- 2024-04-18 add by jiangjl@sunwaoworld.com------------end